﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 物料
    /// </summary>
    [Table("T_Material")]
    public class Material : BaseEntity
    {
        /// <summary>
        /// 物料号
        /// </summary>
        [MaxLength(50)]
        public string Code { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        [MaxLength(20)]
        public string Name { get; set; }
        /// <summary>
        /// 型号规格
        /// </summary>
        [MaxLength(50)]
        public string ModelSpec { get; set; }

        public long? TypeId { get; set; }
        [MaxLength(50)]
        public string TypeCode { get; set; }
        /// <summary>
        /// 物料类型
        /// </summary>
        [MaxLength(50)]
        public string TypeName { get; set; }
        [MaxLength(50)]
        public string FullTypeIds { get; set; }
        [MaxLength(50)]
        public string FullTypeNames { get; set; }
        /// <summary>
        /// 基本单位Id
        /// </summary>
        public long? UnitId { get; set; }
        /// <summary>
        /// 基本单位(物料单位)
        /// </summary>
        [MaxLength(50)]
        public string UnitName { get; set; }
        /// <summary>
        /// 毛重
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? GrossWeight { get; set; }
        /// <summary>
        /// 净重
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? NetWeight { get; set; }
        /// <summary>
        /// 毛重重量单位Id
        /// </summary>
        public long? GrossWeightUnitId { get; set; }
        /// <summary>
        /// 毛重重量单位
        /// </summary>
        [MaxLength(50)]
        public string GrossWeightUnitName { get; set; }
        /// <summary>
        /// 净重重量单位Id
        /// </summary>
        public long? NetWeightUnitId { get; set; }
        /// <summary>
        /// 净重重量单位
        /// </summary>
        [MaxLength(50)]
        public string NetWeightUnitName { get; set; }
        /// <summary>
        /// 体积
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? Volum { get; set; }
        /// <summary>
        /// 体积单位Id
        /// </summary>
        public long? VolumUnitId { get; set; }
        /// <summary>
        /// 体积单位
        /// </summary>
        [MaxLength(50)]
        public string VolumUnitName { get; set; }
        /// <summary>
        /// 最小安全库存
        /// </summary>
        public int? MinSafetyStock { get; set; }
        /// <summary>
        /// 最大安全库存
        /// </summary>
        public int? MaxSafetyStock { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        [MaxLength(50)]
        public string Remark { get; set; }

        /// <summary>
        /// 物料图
        /// </summary>
        [MaxLength(500)]
        public string Img { get; set; }

        /// <summary>
        /// 物料分类Id
        /// </summary>
        public long? MaterialCategoryId { get; set; }

        /// <summary>
        /// 是否有货号详情(是否有资产明细)
        /// </summary>
        public bool? HasSkuDetail { get; set; }

        /// <summary>
        /// 物料组Id
        /// </summary>
        public long? MaterialGroupId { get; set; }

        /// <summary>
        /// 是否充电
        /// </summary>
        public bool? IsNeedCharging { get; set; }

        /// <summary>
        /// 保质期（单位月份）
        /// </summary>
        public int? ExpirationMonth { get; set; }

        /// <summary>
        /// 物料分类名称
        /// </summary>
        [MaxLength(50)]
        public string MaterialCategoryName { get; set; }

        /// <summary>
        /// 是否可以拆卸
        /// </summary>
        public bool? IsDismantle { get; set; }

        /// <summary>
        /// 预警天数
        /// </summary>
        public int? WarningDays { get; set; }

        /// <summary>
        /// 物料EPC值
        /// </summary>
        public string? MaterialEPCId { get; set; }
    }
}
